# msg='my name is xiaofeng!'
# data =msg.upper()
# print(msg)
# print(data)
# info="xiaofeng,123456"
# user_info=info.split(',')
# user_name=input("用户名：")
# user_passwd=input("密码:")
# if user_name==user_info[0] and user_passwd==user_info[1]:
#     print("登录成功")
# else:
#     print("用户名或密码错误")
# data = "武沛齐,root,wupeiqi@qq.com"
#
# v1 = data.rsplit(',')
# print(v1) # ['武沛齐', 'root', 'wupeiqi@qq.com']
#
# v2 = data.rsplit(',',1)
# print(v2) # ['武沛齐,root', 'wupeiqi@qq.com']
# data = ['xiaofeng','biancheng']
# print("_".join(data))
# name="{name}已经{age}岁了。".format(name="xiaofeng",age=20)
# print(name)
# v1="xiaofeng"
# print(v1.center(18,"*"))
# print(v1.rjust(18,"*"))
# print(v1.ljust(18,"*"))
# data ="101"
# print(data.zfill(8))
# print("xiao"+"feng")
# print(len("xiaofeng"))
# a="来这里吃点东西"
# print(a[0])
# print(a[-2])
message = "来吃点py东西呀"
#          0 1 2345 6 7
print(message[0:2]) # "来吃"
print(message[3:7]) # "py东西"
print(message[3:] ) # "py东西呀"
print(message[:5] ) # "来吃点py"
print(message[4:-1]) # "y东西"
print(message[4:-2]) # "y东"
print(message[4:len(message)] ) # "y东西呀"
print(message[::-1])#相当于字符串逆置